<%@ Page Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="Invoice.aspx.cs" Inherits="Pages_Invoice" Title="Finished good receive and delivery" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<%--<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
--%>
<%@ Register Src="../WebUserControlstockselect.ascx" TagName="WebUserControlstockselect"
    TagPrefix="uc2" %>
<%@ Register Src="../WebUserControl_acctype.ascx" TagName="WebUserControl_acctype"
    TagPrefix="uc1" %>
<%--<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
--%>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div>
        
        &nbsp;
        <table style="width: 133px">
            
            <tr>
                <td style="width: 300px; height: 596px" valign="top">
                    <table>
                        <tr>
                            <td style="width: 390px"> 
                                <table>
                                <tr>
                                    <td>
                                        &nbsp;<asp:TextBox ID="TextBoxRefNature" runat="server" BackColor="Yellow"></asp:TextBox>
                                        <asp:ScriptManager ID="ScriptManager1" runat="server">
                                        </asp:ScriptManager>
                                    </td>
                                </tr>
                                <tr>
                                        <td>
                                            <asp:Label ID="Label2" runat="server" Text="Mon :  Year :"></asp:Label>                        
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:DropDownList ID="DropDownListMonth" runat="server" 
                                                OnSelectedIndexChanged="DropDownListMonth_SelectedIndexChanged" Enabled="False">
                                                <asp:ListItem Value="1">Jan</asp:ListItem>
                                                <asp:ListItem Value="2">Feb</asp:ListItem>
                                                <asp:ListItem Value="3">Mar</asp:ListItem>
                                                <asp:ListItem Value="4">Apr</asp:ListItem>
                                                <asp:ListItem Value="5">May</asp:ListItem>
                                                <asp:ListItem Value="6">Jun</asp:ListItem>
                                                <asp:ListItem Value="7">Jul</asp:ListItem>
                                                <asp:ListItem Value="8">Aug</asp:ListItem>
                                                <asp:ListItem Value="9">Sep</asp:ListItem>
                                                <asp:ListItem Value="10">Oct</asp:ListItem>
                                                <asp:ListItem Value="11">Nov</asp:ListItem>
                                                <asp:ListItem Value="12">Dec</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:DropDownList ID="DropDownListYear" runat="server" OnLoad="Page_Load" 
                                                Width="80px" AutoPostBack="True" 
                                                OnSelectedIndexChanged="DropDownListYear_SelectedIndexChanged" Enabled="False">
                                                <asp:ListItem>1999</asp:ListItem>
                                                <asp:ListItem>2000</asp:ListItem>
                                                <asp:ListItem>2001</asp:ListItem>
                                                <asp:ListItem>2002</asp:ListItem>
                                                <asp:ListItem>2003</asp:ListItem>
                                                <asp:ListItem>2004</asp:ListItem>
                                                <asp:ListItem>2005</asp:ListItem>
                                                <asp:ListItem>2006</asp:ListItem>
                                                <asp:ListItem>2007</asp:ListItem>
                                                <asp:ListItem>2008</asp:ListItem>
                                                <asp:ListItem>2009</asp:ListItem>
                                                <asp:ListItem>2010</asp:ListItem>
                                                <asp:ListItem>2011</asp:ListItem>
                                                <asp:ListItem>2012</asp:ListItem>
                                                <asp:ListItem>2013</asp:ListItem>
                                                <asp:ListItem>2014</asp:ListItem>
                                                <asp:ListItem>2015</asp:ListItem>
                                                <asp:ListItem></asp:ListItem>
                                            </asp:DropDownList>
                <asp:TextBox ID="TextBoxDate" runat="server"></asp:TextBox>
                <cc1:CalendarExtender ID="TextBoxDate_CalendarExtender" runat="server" 
                    Enabled="True" TargetControlID="TextBoxDate">
                </cc1:CalendarExtender>
                                        </td>
                                    </tr>
                                    
                                    <tr>
                                        <td style="width: 3px">
                                            <asp:Label ID="Label9" runat="server" Text="Name: "></asp:Label></td>                           
                                    </tr>
                                    <tr><td style="width: 3px">
                                            <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                                                <asp:ListItem Value="FRM">Finished Goods Receive (FRM)</asp:ListItem>
                                                <asp:ListItem Value="IV">Finished Goods Delivery (IV)</asp:ListItem>
                                            </asp:DropDownList></td></tr>
                                    <tr>
                                        <td>
                                            &nbsp;</td>                            
                                    </tr>
                                    <tr><td></td></tr>
                                </table>  Account Selection</td>             
                         </tr>
                        <tr>
                            <td style="width: 390px"><uc1:WebUserControl_acctype ID="WebUserControl_acctype1" runat="server" /></td>
                        </tr>
                        <tr>
                            <td style="width: 390px; height: 21px">
                                Amount for account :
                                <asp:TextBox ID="TextBox_accamount" runat="server" Width="80px"></asp:TextBox>
                                <asp:Button ID="Button_account_amount" runat="server" Text="Put in Account" OnClick="Button_account_amount_Click" Width="100px" />

                                <asp:Button ID="btnUpdateAcc" runat="server" Width="130px" OnClick="BtnUpdateAcc_Click" /></td>
                        </tr>
                        <tr>
                            <td style="width: 150px; height: 262px;">

                                <asp:Panel ID="Panel1" runat="server" ScrollBars="Both" Width="296px" Height="262px">
                                    <asp:GridView ID="GridView2" runat="server" 
    AutoGenerateColumns="False" CellPadding="4"
                                        ForeColor="#333333" GridLines="None" 
                                        Width="13px" 
    OnRowDeleting="GridView2_RowDeleting" Height="78px">
                                        <RowStyle BackColor="#EFF3FB" />
                                        <Columns>
                                            <asp:CommandField ShowSelectButton="True" />
                                            <asp:CommandField ButtonType="Button" ShowDeleteButton="True" />
                                            <asp:BoundField DataField="accname" HeaderText="accname">
                                                <HeaderStyle HorizontalAlign="Left" Width="400px" />
                                                <ItemStyle Width="400px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="amount" HeaderText="Amount" 
                                                SortExpression="Amount" />
                                            <asp:BoundField DataField="acctypename" HeaderText="acctypename">
                                                <HeaderStyle HorizontalAlign="Left" Width="400px" />
                                                <ItemStyle Width="400px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="debexp" HeaderText="Explanation" />
                                            <asp:BoundField DataField="ACCTYPE" HeaderText="ACCTYPE" />
                                            <asp:BoundField DataField="acccode" HeaderText="ACC" />
                                        </Columns>
                                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <EditRowStyle BackColor="#2461BF" />
                                        <AlternatingRowStyle BackColor="White" />
                                    </asp:GridView>
                                </asp:Panel>
                            </td>
                        </tr>
                            
                    </table>                                       
                </td>
                
                <td style="width: 165px; height: 596px;">
                    <table>
                        <tr>
                        
                        <td style="width: 279px">
                                &nbsp;<asp:Button ID="BtnStkAccount" runat="server" OnClick="ButtonDebit_Click" Width="154px" />
                                &nbsp;&nbsp;<asp:Button ID="Button_Party_Select" runat="server" 
                                    onclick="Button_Party_Select_Click" Text="Party Select" />
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 16px; width: 279px;">
                                &nbsp;<asp:TextBox ID="txtAccTypeName" runat="server" Width="238px" Enabled="False"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td style="height: 21px; width: 279px;">
                                &nbsp;<asp:TextBox ID="txtAccCodeName" runat="server" Width="238px" Enabled="False"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td style="height: 26px; width: 279px;">
                                <asp:TextBox ID="txtAccTypeValue" runat="server" Width="75px" Enabled="False"></asp:TextBox>
                            <asp:TextBox ID="txtAccCodeValue" runat="server" Width="77px" Enabled="False"></asp:TextBox></td>
                       </tr>
                       <tr>
                            <td style="width: 279px">
                                <asp:TextBox ID="TextBox_DeliveryCharge" runat="server" Width="74px"></asp:TextBox>
                                &nbsp;&nbsp;<asp:Button ID="Button_Delivery" runat="server" 
                                    Text="Add Delivery Charge" onclick="Button_Delivery_Click" />
                            </td>
                       </tr>
                        <tr>
                            <td style="height: 262px; width: 279px;" valign="top" >
                            
                            <div style="overflow:scroll; width: 300px; height: 300px">
                            <asp:GridView ID="GridView1" runat="server" BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="None" Width="26px" Height="1px" OnSelectedIndexChanged="GridView1_SelectedIndexChanged1" OnRowDeleting="GridView1_RowDeleting" AutoGenerateColumns="False">
                                    <Columns>
                                        <asp:CommandField ShowSelectButton="True" />
                                        <asp:CommandField ShowDeleteButton="True" />
                                        <asp:BoundField DataField="accname" HeaderText="Accname" />
                                        <asp:BoundField DataField="amount" HeaderText="Amount" />
                                        <asp:BoundField DataField="acctypename" HeaderText="Acctypename" />
                                        <asp:BoundField DataField="debexp" HeaderText="Explanation" />
                                    </Columns>
                                    <FooterStyle BackColor="Tan" />
                                    <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
                                    <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                                    <HeaderStyle BackColor="Tan" Font-Bold="True" />
                                    <AlternatingRowStyle BackColor="PaleGoldenrod" />
                                </asp:GridView>
                                &nbsp;</div>
                        </td>                 
                        </tr>
                    </table>
                    <asp:Button ID="BtnSave" runat="server" Height="53px" Text="Save"
                        Width="120px" OnClick="BtnSave_Click1" />
                   <br />
                    <asp:Label ID="Label10" runat="server" Text="Narration : "></asp:Label>
                   &nbsp<asp:TextBox ID="TextBox_explain" runat="server" Width="200px"></asp:TextBox>
                </td>       
                <td style="width: 4px; height: 596px; vertical-align:top">
                    <table> 
                   <tr>
                    <td>
                     <uc2:WebUserControlstockselect ID="WebUserControlstockselect1" runat="server" />               
                        <asp:TextBox ID="TextBoxAmountNew" runat="server"></asp:TextBox>
                        (Cost New)</td>
                   </tr>
                   <tr>
                   <td style="height: 21px">
                   
                      <asp:Label ID="Label4" runat="server" Text="Ton"></asp:Label>
                      <asp:TextBox ID="TextBoxton" runat="server" Width="65px" OnLoad="TextBoxton_Load" >
                      </asp:TextBox> 
                       <asp:Label ID="Label3" runat="server" Text="Pcs"></asp:Label>
                       <asp:TextBox ID="TextBoxPcs" runat="server" Width="49px"></asp:TextBox>
                       <asp:Label ID="Label5" runat="server" Text="Cost"></asp:Label>
                      <asp:TextBox ID="TextBoxAmount" runat="server" AutoPostBack="True" Enabled="False"></asp:TextBox>
                       <asp:Button ID="Button_PutItem" runat="server" OnClick="Button_PutItem_Click" Text="Put Item" />
                      <div style="overflow:scroll; width: 550px; height: 500px"> 
                    <asp:GridView ID="GridView3" runat="server" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Horizontal" OnSelectedIndexChanged="GridView3_SelectedIndexChanged" Width="633px" OnRowDeleting="GridView3_RowDeleting" Height="60px">
                         <Columns>
                             <asp:CommandField ButtonType="Button" ShowSelectButton="True" />
                             <asp:CommandField ShowDeleteButton="True" />
                             <asp:BoundField DataField="itypestring" HeaderText="Type" >
                                 <ItemStyle HorizontalAlign="Center" />
                             </asp:BoundField>
                             <asp:BoundField DataField="inamestring" HeaderText="Description" >
                                 <ItemStyle HorizontalAlign="Center" />
                             </asp:BoundField>
                             <asp:BoundField DataField="ton" HeaderText="Ton" ApplyFormatInEditMode="True" >
                                 <ItemStyle HorizontalAlign="Center" />
                             </asp:BoundField>
                             <asp:BoundField DataField="Pcs" HeaderText="Pcs" >
                                 <ItemStyle HorizontalAlign="Center" />
                             </asp:BoundField>
                             <asp:BoundField DataField="cost" HeaderText="Cost" >
                                 <ItemStyle HorizontalAlign="Center" />
                             </asp:BoundField>
                             <asp:BoundField DataField="rowtotal" HeaderText="Row Total" >
                                 <ItemStyle HorizontalAlign="Center" />
                             </asp:BoundField>
                         </Columns>
                         <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                         <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                         <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
                         <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                         <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
                         <AlternatingRowStyle BackColor="#F7F7F7" />
                     </asp:GridView>
                    </div>
                    
                     </td>
                    </tr> 
                    
                     </table>
                </td>
            </tr>

        </table>
        <asp:Label ID="Label6" runat="server" Text="Total Debit"></asp:Label>
        &nbsp<asp:TextBox ID="TextBox_totaldebit" runat="server"></asp:TextBox>
        &nbsp<asp:Label ID="Label7" runat="server" Text="Total Credit"></asp:Label>
        &nbsp<asp:TextBox ID="TextBox_totalcredit" runat="server"></asp:TextBox>
        &nbsp<asp:Label ID="Label8" runat="server" Text="Item total"></asp:Label>
        &nbsp<asp:TextBox ID="TextBox_itemtotal" runat="server" Width="208px"></asp:TextBox>
        &nbsp<asp:Button ID="Button_Summary" runat="server" Text="Summarize" 
            onclick="Button_Summary_Click" />
    </div>
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</asp:Content>